Page({
    data: {
      mobile: '', // 原始手机号
      maskedMobile: '' // 脱敏手机号
    },
    onLoad() {
      // 假设从全局或本地获取用户信息
      const app = getApp();
      let mobile = '';
      if (app.globalData.loginUserInfo && app.globalData.loginUserInfo.mobile) {
        mobile = app.globalData.loginUserInfo.mobile;
      }
      // 脱敏处理
      const masked = mobile ? mobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1******$2') : '';
      this.setData({
        mobile,
        maskedMobile: masked
      });
    },
    toRegister() {
      wx.navigateTo({ url: '/my/bindPhone2/bindPhone2' });
    }
  });